package com.xdtech.transportation.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import com.xdtech.sys.model.User;

/**
 * 
 * @author max.zheng
 * @create 2015-03-17 14:04:31
 * @since 1.0
 * @see 
 */
@Entity
@Table(name="TRAN_DRIVER")
@PrimaryKeyJoinColumn(name="DRIVER_ID") 
public class TranDriver extends User implements Serializable{
	private static final long serialVersionUID = 1L;
	@Column(name="DRIVER_NO")
	private String driverNo;
	@Column(name="ID_CARD")
	private String idCard;
	@Column(name="DRIVING_NUM")
	private String drivingNum;
	@Column(name="DRIVING_TYPE")
	private String drivingType;
	
	@OneToMany(mappedBy="tranDriver")
	private List<TranOrder> tranOrders = new ArrayList<TranOrder>();

	public void setDriverNo(String driverNo) {
		this.driverNo = driverNo;
	}
	public String getDriverNo() {
		return driverNo;
	}
	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}
	public String getIdCard() {
		return idCard;
	}
	public void setDrivingNum(String drivingNum) {
		this.drivingNum = drivingNum;
	}
	public String getDrivingNum() {
		return drivingNum;
	}
	public void setDrivingType(String drivingType) {
		this.drivingType = drivingType;
	}
	public String getDrivingType() {
		return drivingType;
	}
	public List<TranOrder> getTranOrders()
	{
		return tranOrders;
	}
	public void setTranOrders(List<TranOrder> tranOrders)
	{
		this.tranOrders = tranOrders;
	}
}
